package homework.date;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;

/**
 * 父亲节为每年的6月第三个星期日
 */
public class FatherDay {



    /*public static boolean isLeapYear( int year){
        GregorianCalendar calendar = new GregorianCalendar();
        return calendar.isLeapYear(year);
    }*/

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        Calendar c = Calendar.getInstance();


        System.out.print("请输入年份:");
        int num = sc.nextInt();

        /*int a = c.getWeeksInWeekYear();//一年中的第几周
        System.out.println(a);
        int b = Calendar.WEEK_OF_MONTH;//每月的第几周
        System.out.println(b);
        int d = Calendar.WEEK_OF_YEAR+1;
        System.out.println(d)*/;


        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
        c.set(num,5,1);

        c.set(Calendar.WEEK_OF_MONTH,4);
        c.set(Calendar.DAY_OF_WEEK,1);

        System.out.println(df.format(c.getTime()));






    }


}
